<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Lista Usários</title>
</head>

<body>
<f:view>

<h:form>
  <h:panelGrid>

    <rich:dataTable value="#{adminAction.users}" var="user">
      <h:column>
        <f:facet name="header">
          <h:outputText value="Nome" />
        </f:facet>
        <h:outputText value="#{user.name}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="E-mail" />
        </f:facet>
        <h:outputText value="#{user.email}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="E-mail" />
        </f:facet>
        <h:outputText value="#{user.email}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="Situação" />
        </f:facet>
        <h:outputText value="#{user.status.name}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="Perfil" />
        </f:facet>
        <h:outputText value="#{user.type.name}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="Acesso" />
        </f:facet>
        <h:outputText value="#{user.lastAcess}" />
      </h:column>
      <h:column>
        <f:facet name="header">
          <h:outputText value="Cadastro" />
        </f:facet>
        <h:outputText value="#{user.creationDate}" />
      </h:column>
      <h:column>
        <h:commandLink action="#{adminAction.prepareEditUser[user.id]}" value="editar" />
      </h:column>
      <h:column>
        <h:commandLink action="#{adminAction.prepareEditUser[user.id]}" value="desalitar" />
      </h:column>
    </rich:dataTable>

  </h:panelGrid>
</h:form>

</f:view>
</body>
</html>